package com.ua.common.email;

public class SendMailRunnable implements Runnable{

	private String email;
	private String subject;
	private String msg;
	private String file;
	
	public SendMailRunnable(String email,String subject,String msg,String file){
		this.email = email;
		this.subject = subject;
		this.msg = msg;
		this.file = file;
	}
	public SendMailRunnable(String email,String subject,String msg){
		this.email = email;
		this.subject = subject;
		this.msg = msg;
	}
	public void run() {
		SendMail mail;
		if(file != null){
			mail = new SendMail(email,subject,msg,file);
		}else{
			mail = new SendMail(email,subject,msg);
		}
		mail.setHtmlformat(true);
		mail.sendmail();
	}
}

